package LeetCode.month02.day33;

public class No26 {
    public int removeDuplicates(int[] nums) {
        int n = nums.length;
        if(n==1) return 1;
        int left =1;
        for (int i = 1; i < n; i++) {
            if(nums[i]!=nums[i-1]) nums[left++]=nums[i];
        }
        return left;
    }
}
